home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 2001-01-19 | 44.9 KB | 2,256 lines
rem ******** Carrion Feast v0.00011b ******** rem ***JOBWARE*** rem Im a jack of all trades, master of none, rem Im looking for work in the industry, in whatever capacity, rem I even make a mean cup of tea, so if you see raw potential, rem and you have some junior positions knocking about, rem then drop me a line at m_h9@excite.com rem This took me about 3 months to create, in case you wondering rem I can also do titles sequences and sfx for film and tv rem checkout www.indyfilms.co.uk rem Ok, thats me pennys worth, now on to the bit where you rem checkout my mad code, and say to yourself, whats this guy on! rem rem laterz... m_h9@excite.com rem rem rem p.s. If your a record producer or you know one, then check out rem the whole of the title song by FOAM in the sounds directory rem name "lofoam.wav" ;) rem setup screen, lose the mouse autocam off set display mode 640,480,16 set camera view 0,40,640,440 hide mouse backdrop off sync on sync rate 30 set ambient light 33 rem load music and speech load sound "sounds/lofoam.wav",88 load sound "sounds/2013.wav",100 load sound "sounds/itsbeen.wav",101 load sound "sounds/thefourth.wav",102 load sound "sounds/basic.wav",103 load sound "sounds/anarchy.wav",104 load sound "sounds/thendis.wav",105 load sound "sounds/tillfinally.wav",106 load sound "sounds/itsthe.wav",107 load sound "sounds/amithe.wav",108 load sound "sounds/drivin.wav",109 load sound "sounds/into.wav",110 rem setup intro objects and textures make object plain 1,180,120 make object plain 2,4000,4000 make object plain 3,20,20 make object plain 4,20,20 make object plain 5,20,20 make object plain 6,20,20 load object "lev1/road.3ds",50 scale object 50,500,500,500 ghost object on 3 ghost object on 4 ghost object on 5 ghost object on 6 fog color rgb(0,0,0) fog distance 1500 fog on for f=1 to 9 load image "decals/wiper000"+str$(f)+".bmp",f next f for f=10 to 99 load image "decals/wiper00"+str$(f)+".bmp",f next f for f=1 to 7 load image "decals/rain000"+str$(f)+".bmp",99+f next f rem more sounds load sound "sounds/monsoon1.wav",1 load sound "sounds/monsoon1.wav",2 load sound "sounds/wiper1.wav",3 load sound "sounds/careng.wav",4 clone sound 5,4 set sound volume 1,80 set sound volume 2,80 set sound volume 3,85 set sound volume 4,80 set sound volume 5,80 position object 1,500,0,500 position object 2,500,0,2000 color object 2,rgb(0,0,0) hide object 50 hide object 1 ghost object on 1 texture object 1,1 position camera 500,0,400 point camera 500,0,500 load image "sys/logo.bmp",200 load image "sys/foamage.bmp",201 load image "sys/mjh.bmp",202 load image "sys/hero.bmp",203 make object plain 40,320,240 make object plain 41,150,300 set object 40,1,1,1,1,0,0,0 set object 41,1,1,0,1,1,1,1 play sound 88 wait 5500 position object 40,500,0,800 position object 41,500,-100,2200 texture object 40,200 texture object 41,203 for f=1 to 255 step 8 set gamma f,f,f sync next f wait 6000 for f=255 to 0 step -8 set gamma f,f,f sync next f texture object 40,201 for f=1 to 255 step 8 set gamma f,f,f sync next f wait 6000 for f=255 to 0 step -8 set gamma f,f,f sync next f scale object 40,200,200,200 texture object 40,202 for f=1 to 255 step 8 set gamma f,f,f sync next f wait 6000 for f=255 to 0 step -8 set gamma f,f,f sync next f hide object 40 position object 40,10000,10000,10000 sync show object 50 show object 1 loop sound 4 play sound 3 play sound 4 set sound speed 3,9000 set sound volume 88,90 do talk=talk+10 if gam>240 and gam<255 then play sound 2 gam=gam+8 if gam>255 then gam=255 set gamma gam,gam,gam rot=rot-16 if rot<0 then rot=360 xrotate object 50,rot show object 1 inc st if st>99 then st=1:play sound 3:play sound 5 if sound playing(1)=0 then play sound 1:set sound speed 1,20000+rnd(1000) if sound playing(2)=0 then play sound 2:set sound speed 2,20000+rnd(1000) if sound playing(4)=0 then play sound 4 rem rain position object 50,1700+rnd(1),-850+rnd(2),1800 texture object 1,st position object 1,499+rnd(1),0,499+rnd(1) position object 3,400+rnd(200),-75+rnd(150),550 position object 4,400+rnd(200),-75+rnd(150),550 position object 5,400+rnd(200),-75+rnd(150),550 position object 6,400+rnd(200),-75+rnd(150),550 texture object 4,99+rnd(7) texture object 3,99+rnd(7) texture object 5,99+rnd(7) texture object 6,99+rnd(7) set cursor 0,450 if talk=1000 then ink 128,0:Print "2013, The true Millennium...":play sound 100 if talk=2000 then ink 128,0:Print "Its been two years since the darkness fell.":play sound 101 if talk=3000 then ink 128,0:Print "The Fourth Kingdom some called it.":play sound 102 if talk=4000 then ink 128,0:Print "Basic civil structure had collapsed after only 6 months":play sound 103 if talk=5000 then ink 128,0:Print "Anarchy reigned.":play sound 104 if talk=5700 then ink 128,0:Print "Then disease...":play sound 105 if talk=7000 then ink 128,0:Print "Until finally the silence.":play sound 106 if talk=8000 then ink 128,0:Print "its the silence that scares me the most.":play sound 107 if talk=9000 then ink 128,0:Print "Am i the only one left?":play sound 108 if talk=9700 then ink 128,0:Print "Driving down the last road.":play sound 109 if talk=10400 then ink 128,0:Print "Into the darkness...":play sound 110 if talk=1900 then ink 0,0:Print "2013, The true Millennium..." if talk=2900 then ink 0,0:Print "Its been two years since the darkness fell." if talk=3900 then ink 0,0:Print "The Fourth Kingdom some called it." if talk=4900 then ink 0,0:Print "Basic civil structure had collapsed after only 6 months" if talk=5600 then ink 0,0:Print "Anarchy reigned." if talk=6900 then ink 0,0:Print "Then disease..." if talk=7900 then ink 0,0:Print "Until finally the silence." if talk=8900 then ink 0,0:Print "its the silence that scares me the most." if talk=9600 then ink 0,0:Print "Am i the only one left?" if talk=10300 then ink 0,0:Print "Driving down the last road." if talk=11900 then ink 0,0:Print "Into the darkness...":set sound volume 88,99 if talk>13000 then ghost object on 41:move object 41,-50 if talk>13350 then goto nextbit sync loop nextbit: fog color rgb(255,255,255) fog distance 1 sync fog off sync cls for f=1 to 6:delete object f:next f delete object 50 delete object 40 delete object 41 delete sound 88 for f=100 to 110 :delete sound f:next f skipintro: rem setup for title screen set display mode 640,480,16 set camera view 0,40,640,440 if matrix exist(1)=1 then delete matrix 1 dim plpathx(100) dim plpathy(100) dim plpathz(100) load sound "sounds/dae.wav",1 play sound 1 sync rate 30 sync on autocam off hide mouse position camera 0,50000,0 point camera 0,50000,0 backdrop on backdrop off sync set ambient light 10 make light 1 make light 2 make light 3 set point light 3,27400,5000,6200 color light 3,rgb(128,0,0) color light 2,rgb(128,128,0) set point light 2,8600,1000,6000 set spot light 1,45,90 hide light 0 hide light 1 hide light 2 rem goto skiptit load object "sys/carrion.3ds",1 load object "sys/feast.3ds",2 load sound "sounds/nel1.wav",2 load image "sys/uglytits.bmp",1 make object plain 3,1500,1000:hide object 3 texture object 3,1 xrotate object 1,wrapvalue(-90) xrotate object 2,wrapvalue(-90) fix object pivot 1 fix object pivot 2 position object 1,0,30,-800 position object 2,0,-50,-800 position object 3,0,0,300 position camera 0,0,-200 point camera 0,0,0 cls:sync for f=1 to 15 move object 1,64 move object 2,64 sync next f show object 3 play sound 2 for f=1 to 6 position camera 0,0,-200+rnd(10) point camera 0,0+rnd(10),0 set ambient light 50+rnd(50) sync next f set ambient light 2 ink rgb(255,255,255),0 set text font "papyrus" set text size 24 do draw to front ink rgb(200,0,0),0 text 15,575,"Vers 0.1a: Copyright 2001: A Dark Menace Production. " ink rgb(128,0,0),0 text 13,573,"Vers 0.1a: Copyright 2001: A Dark Menace Production." inc br rem title flicker set ambient light 33+rnd(10) if spacekey() then goto beginin zrotate object 3,wrapvalue(br) sync loop beginin: delete object 1 delete object 2 delete object 3 play sound 2 delete sound 1 skiptit: position camera 0,50000,0 point camera 0,50000,0 cls rem show milton page while the rest loads load image "sys/loadin.bmp",2222 make object plain 2222,48,48 lock object on 2222 texture object 2222,2222 set object 2222,1,1,1,0,0,1,1 position object 2222,0,0,40 wait 30 for f=1 to 24:sync:next f load object "sys/playtop1.3ds",5 scale object 5,90,90,90 load object "sys/playtop2.3ds",50 load object "sys/flak.3ds",2 load object "lev1/lev1.x",99 load object "lev1\fcamerar.3ds",333 load object "sys/demontel.3ds",444 load object "sys/demon.3ds",445 for a=0 to 8 load image "decals/hel000"+str$(a)+".bmp",444+a next a scale object 333,150,150,150 load object "lev1/light.3ds",128:ghost object on 128 yrotate object 128,180 fix object pivot 128 rem demonteleport stuff texture object 444,444 ex=45900:ey=46100 position object 444,6000,0,6000 scale object 444,300,200,300 play object 444:loop object 444 ghost object on 444 fade object 444,1 set object speed 444,50 set object speed 445,24 position object 445,ex,10,ey yrotate object 445,180 fix object pivot 445 rem position light load object "lev1/light.3ds",129:ghost object on 129 yrotate object 129,180 fix object pivot 129 rem position light set object 128,1,1,1,0,0,0,1 set object 129,1,1,1,0,0,0,1 rem hud clock load image "lev1/ttc2.bmp",6500 for f=0 to 9 load image "lev1/"+str$(f)+".bmp",60000+f next f load image "lev1/colon.bmp",60010 for f=6000 to 6005: make object plain f,12,12 next f rem no. pos position object 6001,-26.3,16,40 scale object 6001,9,20,10 position object 6002,-25,16,40 scale object 6002,9,20,10 position object 6003,-24,16,40 scale object 6003,9,20,10 position object 6004,-23,16,40 scale object 6004,9,20,10 position object 6005,-21.7,16,40 scale object 6005,9,20,10 rem watch position object 6000,-24,16,40 texture object 6000,6500 rem texture clock texture object 6001,60000 texture object 6002,60000 texture object 6003,60010 texture object 6004,60000 texture object 6005,60000 for f=6000 to 6005 set object f,1,1,1,0,0,1,1 lock object on f ghost object on f fade object f,0 hide object f next f rem weapon select hud make object plain 6010,4,2 make object plain 6006,6,3 rem *icon textures* load image "sys/sticki.bmp",60050 load image "sys/ak47i.bmp",60051 load image "sys/seali.bmp",210 position object 6006,0,-18,40 texture object 6006,60050 set object 6006,1,1,1,0,0,1,1 lock object on 6006 ghost object on 6006 hide object 6006 position object 6010,25,-19,40 texture object 6010,210 set object 6010,1,1,1,0,0,1,1 lock object on 6010 ghost object on 6010 hide object 6010 rem Seal stuff load object "sys/seal.3ds",6011 scale object 6011,200,200,200 yrotate object 6011,90 position object 6011,26000,1000,6000 load object "sys/seal2.3ds",6012 scale object 6012,200,200,200 position object 6012,26000,1000,6000 ghost object on 6012 rem video hud make object plain 6100,20,20 for f=0 to 9 load image "sys/vid000"+str$(f)+".bmp",60100+f next f vsp#=44 position object 6100,44,17,40 texture object 6100,60100 set object 6100,1,1,1,0,0,1,1 lock object on 6100 ghost object on 6100 make object plain 6101,8,7 for f=0 to 9 load image "sys/ben000"+str$(f)+".bmp",60200+f next f position object 6101,23,17,40 texture object 6101,60200 set object 6101,1,1,1,0,0,1,1 lock object on 6101 ghost object on 6101 hide object 6101 rem more sounds load sound "sounds/demonfoot.wav",100 load sound "sounds/deded.wav",101 load sound "sounds/ow.wav",102 load sound "sounds/benintro.wav",104 rem sample golum rem make object plain 1888,1000,1000 rem position object 1888,5000,450,8000 rem load image "decals/ghoul01.bmp",45001 rem texture object 1888,45001 rem set object 1888,1,1,1,0,0,1,1 rem texture object 1888,45001 rem ghost object on 1888 rem position lensflares position object 128,8610,620,4630 scale object 128,1000,1000,1000 position object 129,8615,620,6965 scale object 129,1000,1000,1000 position object 99,7500,0,7500 rem speed up the level make static object 99 delete object 99 ghost object on 2 set object speed 5,64 set object speed 50,64 make object sphere 1,160 make object sphere 6,60 make object sphere 999,10 make object sphere 540,100 set object rotation zyx 5 set object rotation zyx 50 set object rotation zyx 2 make object plain 200,400,400 xrotate object 200,90 yrotate object 200,rnd(360) fix object pivot 200 load object "lev1/atmos.3ds",201 set object 201,1,1,1,0,0,0,1 ghost object on 200 color object 200,0 ghost object on 201 load image "decals/hole.bmp",666 for f=250 to 259:make object plain f,200,200:next f for f=260 to 280:make object plain f,20,20:texture object f,666 set object f,1,rgb(0,0,0),0,1 zrotate object f,rnd(360) fix object pivot f next f for f=250 to 256 set object f,1,0,0,0,0,1,0 set object rotation zyx f ghost object on f next f set object rotation zyx 200 set object rotation zyx 540 hide object 540 rem load lots and lots of textures imgno=999 for f=0 to 9 inc imgno load image "decals/blood000"+str$(f)+".bmp",imgno next f for f=10 to 24 inc imgno load image "decals/blood00"+str$(f)+".bmp",imgno next f imgno=1049 for f=0 to 9 inc imgno load image "decals/sparks000"+str$(f)+".bmp",imgno next f for f=10 to 12 inc imgno load image "decals/sparks00"+str$(f)+".bmp",imgno next f imgno=1099 for f=0 to 6 inc imgno load image "decals/shoot000"+str$(f)+".bmp",imgno next f imgno=1199 for f=0 to 9 inc imgno load image "decals/tele000"+str$(f)+".bmp",imgno next f for f=10 to 24 inc imgno load image "decals/tele00"+str$(f)+".bmp",imgno next f imgno=1299 for f=0 to 9 inc imgno load image "decals/smoke000"+str$(f)+".bmp",imgno next f for f=10 to 12 inc imgno load image "decals/smoke00"+str$(f)+".bmp",imgno next f color object 1,rgb(30,30,30) ghost object on 1 set camera range 10,6000 fog distance 3500 fog on fog color rgb(0,0,0) MAIN: fade object 2,100 set ambient light 10 hide object 999 cr=150 gosub level1 randomize matrix 1,50 update matrix 1 load 3dsound "sounds/wind.wav",1 load 3dsound "sounds/wind.wav",10 load 3dsound "sounds/church.wav",11 load sound "sounds/walk.wav",2:set sound volume 2,89 load sound "sounds/walkwoo.wav",12:set sound volume 12,89 load sound "sounds/gunauto1.wav",3:set sound volume 3,90 clone sound 4,3 clone sound 6,2:set sound speed 6,30000 load sound "sounds/teleport2.wav",5:set sound volume 5,100 load sound "sounds/swish.wav",40 rem ambient sounds load sound "sounds/howl02.wav",50 load sound "sounds/thunder2.wav",51 load sound "sounds/demon3.wav",52 load sound "sounds/demon2.wav",53 load sound "sounds/demon1.wav",54 load sound "sounds/runaway.wav",55 rem false demom make object sphere 446,1 delete object 2222 start: rem *** player start position *** position object 6,1300,0,6000 pweap=4 weap=4 hide object 2 fn=200 tn=1 hide mouse sync mill=59 sec=59 secs=9 mins=5 hole=259 set text size 24 ink rgb(255,10,10),0 rem blood if object exist(777)=1 then goto skipmakebloodplain make object plain 777,300,600 ghost object on 777 set object rotation zyx 777 texture object 777,1000 skipmakebloodplain: REM **************START************* dim smt(6) opx=object position x(6) opy=object position z(6) opz=object position y(6) show light 1 walk=20 smp=-1 hide object 444 ez=50 seal=0 hide object 6010:show object 6012:show object 6011 cls do rem rotate seal constantly and check for collection srot=srot+30 if srot=30000 then srot=0 yrotate object 6012,wrapvalue(srot) if seal=1 then hide object 6011:hide object 6012:show object 6010 if opx>25500 and opx<26500 and opy>5500 and opy<6500 then seal=1 rem teleport texture point object 128,opx,600,opy fade object 128,50+rnd(50) point object 129,opx,600,opy fade object 129,50+rnd(50) rem demon stuff position object 445,ex,ez,ey position object 446,ex,ez,ey rem demon collision state=0 if opx>ex-500 and opx<ex+500 and opy>ey-500 and opy<ey+500 then state=2 if opx>ex-500 and opx<ex+500 and opy>ey-500 and opy<ey+500 then state=2:fol=0:path=0:if object frame(445)<70 or object frame(445)>100 then set object frame 445,70 if state=0 rem player path if path>99 then path=0 if path=99 then fol=1 if sopx<>opx then inc path:goto skippath if sopy<>opy then inc path skippath: plpathx(path)=opx plpathy(path)=opy plpathz(path)=object position y(6)-(dh+350) if fol=1 if flash=0 then flash=1 inc pathf if pathf>99 then pathf=1 if pathf=1 and sound playing(55)=0 then play sound 55 ex=plpathx(pathf) ey=plpathy(pathf) ez=plpathz(pathf) if ez<50 then ez=50 walk=walk+2 if walk=40 then play sound 100 if walk>59 then walk=20:play sound 100 set object frame 445,walk endif endif rem demon appear if flash>0 then inc flash:texture object 444,444+rnd(8) if flash=2 then show object 444:position object 444,ex,0,ey if flash=10 then hide object 444 rem smooth demon turn point object 446,opx,0,opy yrotate object 445,curvevalue(object angle y(446),object angle y(445),5) gosub checkdemonstate rem demon hits you if object frame(445)>85 and object frame(445)<91 and state=2 then inc pain:set gamma 255,0,0:red=1:if sound playing(102)=0 then play sound 102 if red>0 then inc red if red=5 then red=0:set gamma 255,255,255 if pain>4 then dead=1 if dead=1 then goto deaded: rem flashlight set light to object position 0,5 position light 1,object position x(999),object position y(999),object position z(999) point light 1,object position x(1),object position y(1),object position z(1) position listener object position x(6),object position y(6),object position z(6) rem false camera distance position object 333,object position x(6),((object position y(6))+noh)-250,object position z(6) rem dateline if titlecount<250 inc titlecount if titlecount=1 then for f=6000 to 6006:show object f:next f ltitc#=ltitc#+0.5 ltc=ltitc# tit$="1954: Somewhere in the Po valley: Italy: 23:54 pm" if titlecount<110 then ntit$=left$(tit$,ltc):if sound playing(6)=0 then play sound 6 ink 0,0 text 10,360,ntit$ ink rgb(255,32,32),0 if titlecount<110 then ntit$=left$(tit$,ltc) text 10,361,ntit$ if titlecount=50 show light 1 show light 2 endif if titlecount=248 then draw to back if titlecount=249 then draw to front endif rem retrievel if opx<2000 and seal=1 then goto theend texture object 6002,60000+(mins) texture object 6004,60000+(sec/10) texture object 6005,60000+(secs) if sec<10 then texture object 6004,60000:texture object 6005,60000+sec mill=mill-2 if mill<0 then dec sec:dec secs:mill=59 if sec<0 then dec mins:sec=59 if secs<0 then secs=9 if mins<0 then goto theend set ambient light 10 rem select weapon if scancode()=2 then pweap=1 if scancode()=5 then pweap=4 if mouseclick()<>0 then weap=pweap if pweap=4 then texture object 6006,60051 if pweap=1 then texture object 6006,60050 if weap=4 then hide object 50:show object 5 if weap=1 then hide object 5:show object 50 rem weapon 1(stick) if weap=1 if mouseclick()=1 and object playing(50)=0 and sound playing(40)=0 then play object 50:set sound speed 40,16000:play sound 40 endif rem weapon 4(ak47) if weap=4 if mouseclick()=0 then shf=0:hide object 200 if mouseclick()=1 and shoot=0 then shoot=1: play object 5:sfn=1 else hide object 2 if mouseclick()=1 idle=0 inc shf if shf=6 then shf=0 if shf=1 show object 2: play sound 3:inc hole:inc shole:if hole>280 then hole=260 set ambient light 33 endif if shole>1999 then shole=999 goto skipwep4 endif endif if weap=4 if mouseclick()=0 then shf=0 if mouseclick()=2 and shoot=0 then shoot=1: play object 5:sfn=1 else hide object 2 if mouseclick()=2 idle=0 inc shf if shf>3 then shf=0 if shf=1 show object 2: play sound 3:inc hole:if hole>280 then hole=260 set ambient light 33 endif endif endif skipwep4: inc idle rem sounds n stuff if object position x(6)>11500 then position sound 11,opx,object position y(6),opy if object position x(6)<11501 position sound 10,opx,200,opy position sound 1,opx,200,opy if amso=1 then play sound 50 if amso=2 then play sound 51:fog color rgb(255,255,255):set ambient light 100:sync:fog color rgb(0,0,0):set ambient light 10 endif rotate listener 0,object angle y(6),0 if sound playing(1)=0 then play sound 1 if sound playing(11)=0 then play sound 11 if sound playing(10)=0 and titlecount>125 then play sound 10 amso=rnd(1500) if amso=3 then play sound 52 if amso=4 then play sound 53 if amso=5 then play sound 54 if cr<150 then cr=cr+10 if scancode()=0 then dec sp if scancode()=82 then cr=0 if sp<0 then sp=0 if cr>100 then if sp>0 then sp=2 if cr<101 then if sp>0 then sp=1 gosub chekrange if repel=1 then repel=0:goto sopskip sopx=object position x(6) sopy=object position z(6) sopz=object position y(6) sopskip: gosub chekrange if dead=1 then gosub skipmov if upkey()=1 or downkey()=1 or leftkey()=1 or rightkey()=1 then sp=48:gosub bobtest:gosub bobtest if upkey()=1 and downkey()=1 then goto skipup if leftkey()=1 and rightkey()=1 then goto skipstrafe if upkey()=1 move object 6,sp endif if downkey()=1 move object 6,0-sp endif skipup: if leftkey()=1 yrotate object 6,wrapvalue(rot+90) move object 6,0-sp yrotate object 6,wrapvalue(rot-90) endif if rightkey()=1 yrotate object 6,wrapvalue(rot-90) move object 6,0-sp yrotate object 6,wrapvalue(rot+90) endif skipstrafe: if scancode()=79 and oh<=gh jump=50 endif oh=oh+jump:jump=jump-8 gh=(get ground height(1,object position x(5),object position z(5)))+(100+cr) if oh<gh then oh=gh:jump=0 if oh>100+(gh) and oh<100+(gh+16) and opx<11600 then play sound 2 if oh>100+(gh) and oh<100+(gh+16) and opx>11599 then play sound 12 rem *** object collision *** skipmov: opx=object position x(6) opy=object position z(6) opz=object position y(6) nopx=opx nopy=opy gosub chekrange if repel=1 then opx=sopx:repel=0 gosub chekrange if repel=1 then opy=sopy:opx=nopx repel=0 gosub chekrange if repel=1 then opx=sopx:repel=0 gosub chekrange if repel=1 then opy=sopy:opx=nopx repel=0 pah=pah+mousemovey()*4 if pah<-1000 then pah=-1000 if pah>1000+noh then pah=1000+noh rot=rot+mousemovex()/4 position object 1,object position x(5),pah,object position z(5) yrotate object 1,wrapvalue(rot):yrotate object 6,wrapvalue(rot) move object 1,1000 if fn>209 then fn=200 if shoot=1 and shf=1 then fu=0:fs=0:fe=0:gosub chekshotwall if fu=1 then fs=0:fe=0 if fs=1 then fu=0:fe=0 if fe=1 then fs=0:fu=0 if shoot=1 and fu=1 and shf=1 position object hole,object position x(200),object position y(200),object position z(200) point object hole,object position x(540),100000,object position z(540) rotate object 200,rnd(360),rnd(360),rnd(360) endif if shoot=1 and fs=1 and shf=1 position object hole,object position x(200),object position y(200),object position z(200) point object hole,0,0,100000 rotate object 200,rnd(360),rnd(360),rnd(360) endif if shoot=1 and fe=1 and shf=1 position object hole,object position x(200),object position y(200),object position z(200) point object hole,100000,0,0 rotate object 200,rnd(360),rnd(360),rnd(360) endif rem **********SMOKE************ if idle>50 then goto skipsmokeifidle if hole>ohole inc smp if smp=1 then smt(1)=1:show object 250:yrotate object 250,rnd(360) if smp=2 then smt(2)=1:show object 251:yrotate object 251,rnd(360) if smp=3 then smt(3)=1:show object 252:yrotate object 252,rnd(360) if smp=4 then smt(4)=1:show object 253:yrotate object 253,rnd(360) if smp=5 then smt(5)=1:show object 254:yrotate object 254,rnd(360) if smp=6 then smt(6)=1:show object 255:yrotate object 255,rnd(360) if smp>6 then smp=1 endif if smt(1)>0 then smt(1)=smt(1)+1 if smt(2)>0 then smt(2)=smt(2)+1 if smt(3)>0 then smt(3)=smt(3)+1 if smt(4)>0 then smt(4)=smt(4)+1 if smt(5)>0 then smt(5)=smt(5)+1 if smt(6)>0 then smt(6)=smt(6)+1 if smt(1)>12 then smt(1)=0:hide object 250 if smt(2)>12 then smt(2)=0:hide object 251 if smt(3)>12 then smt(3)=0:hide object 252 if smt(4)>12 then smt(4)=0:hide object 253 if smt(5)>12 then smt(5)=0:hide object 254 if smt(6)>12 then smt(6)=0:hide object 255 if smt(1)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200) if smt(2)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200) if smt(3)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200) if smt(4)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200) if smt(5)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200) if smt(6)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200) for f=1 to 6 point object 249+f,0,100000,0:move object 249+f,30 point object 249+f,object position x(5),object position y(5),object position z(5) move object 249+f,30 texture object 249+f,1300+smt(f) next f ohole=hole skipsmokeifidle: rem blood splatter if blood>998 then inc blood if blood>1024 then blood=998 if blood>999 then texture object 777,blood if replace=2 then fol=0:path=0:flash=1 if replace>1 and blood=1024 then ex=35000:replace=0:pathf=0:flash=0:position object 777,30000,0,0:hide object 444 if tn>12 then tn=1+rnd(2):shoot=0 texture object 200,1049+tn tn=tn+2 texture object 2,1099+(1+rnd(6)) ranged: position object 6,opx,100+oh+bobber+noh+def,opy point object 5,object position x(1),pah,object position z(1) position object 5,object position x(6),object position y(6)+bobber+(brs#*10),object position z(6) point object 50,object position x(1),pah,object position z(1) position object 50,object position x(6),object position y(6)+bobber+(brs#*10),object position z(6) point object 2,object position x(1),pah,object position z(1) position object 2,object position x(6),object position y(6)+bobber+(brs#*10),object position z(6) if count<25 inc count if count=1 then play sound 5 texture object 201,1199+count position object 201,object position x(5),200,object position z(5) endif if count=25 then hide object 201 breath=breath+4 brs#=cos(breath) if breath>360 then breath=0 position object 999,object position x(5),object position y(5),object position z(5) point object 999,object position x(1),pah,object position z(1) xrotate object 999,wrapvalue(object angle x(999)-90) move object 999,90+(bobber/2):xrotate object 999,wrapvalue(object angle x(999)+90) move object 999,10 position camera object position x(999),object position y(999),object position z(999) if seal=0 then point camera object position x(1),pah+bobber,object position z(1) if seal=1 then point camera object position x(1)+rnd(100),pah+bobber+rnd(100),object position z(1)+rnd(100) rem position camera object position x(5),1000,object position z(5) rem point camera object position x(5),0,object position z(5) rem additions gosub activatevideo sync loop bobtest: if seal=1 then sp=24 if upkey()=1 and downkey()=1 then return if leftkey()=1 and rightkey()=1 then return if jump<>0 then return inc bobbin if opx<11700 if bobbin=19 or bobbin=9 then set sound speed 2,10500-rnd(200):play sound 2 endif if opx>11699 if bobbin=19 or bobbin=9 then set sound speed 12,10500-rnd(200):play sound 12 endif if bobbin<10 then inc bobber if bobbin>9 then dec bobber if bobbin>19 then bobbin=0:bobber=0 return level1: rem --------------------------------------- SET VARIABLES matrix_x = 25000 matrix_z = 25000 matrix_y = 500 rem fog distance matrix_z*1.5 tile_count_x = 20 tile_count_z = 20 tile_count = tile_count_x * tile_count_z rem dim tile_number_image(6000) tile_image = 1 rem --------------------------------------- LOAD 10 BMPs and Images for t = 1 to 10 load bitmap "paths/"+str$(t)+".bmp",1 get image t,0,0,256,256 next t rem --------------------------------------- Make Matrix-image create bitmap 1,2560,256 x_image = 0 for t = 1 to 10 paste image t,x_image,0 inc x_image,256 next t get image 11,0,0,2560,256 delete bitmap 1 rem --------------------------------------- LOAD MAP open to read 1,"sys/level.mmf" read string 1,a$ : matrix_x = val(a$) read string 1,a$ : matrix_z = val(a$) read string 1,a$ : tile_count_x = val(a$) read string 1,a$ : tile_count_z = val(a$) read string 1,a$ : read string 1,a$ : read string 1,a$ : read string 1,a$ : read string 1,a$ : read string 1,a$ : read string 1,a$ : make matrix 1, 12000, 12000, tile_count_x, tile_count_z prepare matrix texture 1,11,10,1 tile_x = 0 tile_z = 0 tile_number = 0 for a = 0 to tile_count_z for t = 0 to tile_count_x read string 1,a$ set matrix height 1, tile_x, tile_z,val(a$) inc tile_x,1 next t inc tile_z,1 tile_x = 0 next a tile_x = 0 tile_z = 0 tile_tmp = 0 for t = 0 to tile_count_z-1 for a = 0 to tile_count_x-1 read string 1,a$ set matrix tile 1, tile_x, tile_z, val(a$) inc tile_x next a tile_x = 0 inc tile_z next t close file 1 return return chekshotwall: position object 540,object position x(5),oh+150+noh,object position z(5) point object 540,object position x(1),pah,object position z(1) oropx=object position x(540) oropy=object position z(540) oropz=object position y(540) for f=1 to 800: move object 540,8 rem ****collisions*** ropx=object position x(540) ropy=object position z(540) ropz=object position y(540) oropx=object position x(540) oropy=object position z(540) oropz=object position y(540) if ropz<0 then fu=1:goto skipchek if ropx<710 and ropy>650 and ropy<4500 then fe=1: goto pit if ropx<710 and ropy>7500 and ropy<11480 then fe=1: goto pit if ropy>11420 and ropx>650 and ropx<11480 then fs=1:goto pit if ropy<650 and ropx>650 and ropx<11480 then fs=1:goto pit if ropx>11450 and ropx<11580 and ropy>6900 and ropy<11480 then fe=1: goto pit if ropx>11450 and ropx<11580 and ropy>600 and ropy<5100 then fe=1: goto pit if ropx>11230 and ropx<11580 and ropy>6300 and ropy<6950 then fe=1: goto pit if ropx>11230 and ropx<11580 and ropy>5050 and ropy<5700 then fe=1: goto pit if ropx>11230 and ropx<11580 and ropy>5700 and ropy<6300 and object position y(540)>800 then fe=1: goto pit rem check demon pos if ropx>ex-125 and ropx<ex+125 and ropy>ey-125 and ropy<ey+125 and ropz<1200 position object 777,ropx,ropz+50,ropy point object 777,opx,0,opy:move object 777,150 if blood<999 then blood=999:inc replace goto pit endif if ropx>11390 and ropx<11580 and ropy>7030 and ropy<7200 then fe=1: goto pit if ropx>11390 and ropx<11580 and ropy>9250 and ropy<9380 then fe=1: goto pit if ropx>11390 and ropx<11580 and ropy>4820 and ropy<4950 then fe=1: goto pit if ropx>11390 and ropx<11580 and ropy>2550 and ropy<2700 then fe=1: goto pit if ropx>8475 and ropx<8760 and ropy>4500 and ropy<4770 and ropz<720 chag1=0 rotate object 540,0,0,0 chekagain1: inc chag1 position object 540,oropx,oropz,oropy if chag1=1 then yrotate object 540,0:move object 540,12:fs=1 if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0 if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0 if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0 if chag=5 then position object 540,oropx,oropz,oropy:goto pit ropx=object position x(540) ropy=object position z(540) ropz=object position y(540) position object 540,oropx,oropz,oropy if ropx>8475 and ropx<8760 and ropy>4500 and ropy<4770 then goto chekagain1 goto pit endif if ropx>8475 and ropx<8780 and ropy>6810 and ropy<7110 and ropz<720 chag1=0 rotate object 540,0,0,0 chekagain2: inc chag1 position object 540,oropx,oropz,oropy if chag1=1 then yrotate object 540,0:move object 540,12:fs=1 if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0 if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0 if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0 if chag=5 then position object 540,oropx,oropz,oropy:goto pit ropx=object position x(540) ropy=object position z(540) ropz=object position y(540) position object 540,oropx,oropz,oropy if ropx>8475 and ropx<8780 and ropy>6810 and ropy<7110 then goto chekagain2 goto pit endif if ropx>5220 and ropx<7320 and ropy>10470 chag1=0 rotate object 540,0,0,0 chekagain3: inc chag1 position object 540,oropx,oropz,oropy if chag1=1 then yrotate object 540,0:move object 540,12:fs=1 if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0 if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0 if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0 if chag=5 then position object 540,oropx,oropz,oropy:goto pit ropx=object position x(540) ropy=object position z(540) ropz=object position y(540) position object 540,oropx,oropz,oropy if ropx>5220 and ropx<7320 and ropy>10470 then goto chekagain3 goto pit endif rem left tree if ropx>4413 and ropx<4580 and ropy>8345 and ropy<8454 chag1=0 rotate object 540,0,0,0 chekagain4: inc chag1 position object 540,oropx,oropz,oropy if chag1=1 then yrotate object 540,0:move object 540,12:fs=1 if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0 if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0 if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0 if chag=5 then position object 540,oropx,oropz,oropy:goto pit ropx=object position x(540) ropy=object position z(540) ropz=object position y(540) position object 540,oropx,oropz,oropy if ropx>4413 and ropx<4580 and ropy>8345 and ropy<8454 then goto chekagain4 goto pit endif rem right tree if ropx>4413 and ropx<4580 and ropy>3950 and ropy<4160 chag1=0 rotate object 540,0,0,0 chekagain5: inc chag1 position object 540,oropx,oropz,oropy if chag1=1 then yrotate object 540,0:move object 540,12:fs=1 if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0 if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0 if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0 if chag=5 then position object 540,oropx,oropz,oropy:goto pit ropx=object position x(540) ropy=object position z(540) ropz=object position y(540) position object 540,oropx,oropz,oropy if ropx>4413 and ropx<4580 and ropy>3950 and ropy<4160 then goto chekagain5 goto pit endif rem nearest spire if ropx>0 and ropx<1840 and ropy>1072 and ropy<2920 chag1=0 rotate object 540,0,0,0 chekagain6: inc chag1 position object 540,oropx,oropz,oropy if chag1=1 then yrotate object 540,0:move object 540,12:fs=1 if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0 if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0 if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0 if chag=5 then position object 540,oropx,oropz,oropy:goto pit ropx=object position x(540) ropy=object position z(540) ropz=object position y(540) position object 540,oropx,oropz,oropy if ropx>0 and ropx<1840 and ropy>1072 and ropy<2920 then goto chekagain6 goto pit endif rem rpillar if ropx>0 and ropx<1034 and ropy>4430 and ropy<4797 chag1=0 rotate object 540,0,0,0 chekagain7: inc chag1 position object 540,oropx,oropz,oropy if chag1=1 then yrotate object 540,0:move object 540,12:fs=1 if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0 if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0 if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0 if chag=5 then position object 540,oropx,oropz,oropy:goto pit ropx=object position x(540) ropy=object position z(540) ropz=object position y(540) position object 540,oropx,oropz,oropy if ropx>0 and ropx<1034 and ropy>4430 and ropy<4797 then goto chekagain7 goto pit endif rem lpillar if ropx>0 and ropx<1034 and ropy>7250 and ropy<7650 chag1=0 rotate object 540,0,0,0 chekagain8: inc chag1 position object 540,oropx,oropz,oropy if chag1=1 then yrotate object 540,0:move object 540,12:fs=1 if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0 if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0 if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0 if chag=5 then position object 540,oropx,oropz,oropy:goto pit ropx=object position x(540) ropy=object position z(540) ropz=object position y(540) position object 540,oropx,oropz,oropy if ropx>0 and ropx<1034 and ropy>7250 and ropy<7650 then goto chekagain8 goto pit endif rem hedges if ropx>900 and ropx<6750 and ropy>8500 and ropy<9100 and ropz<500 then goto pit if ropx>6200 and ropx<7800 and ropy>7850 and ropy<9550 and ropz<500 then goto pit if ropx<6500 and ropy>3250 and ropy<3900 and ropz<500 then goto pit if ropx>6000 and ropx<8000 and ropy>2700 and ropy<4500 and ropz<500 then goto pit next f position object 200,object position x(540),object position y(540),object position z(540):goto skipskipchek return pit: position object 200,object position x(540),object position y(540),object position z(540):goto skipskipchek skipchek: position object 200,object position x(540),get ground height(1,object position x(540),object position z(540))+3,object position z(540) skipskipchek: show object 200 smoke=1 return chekrange: if opx<900 then repel=1 if opx<11500 and opy>11150 then repel=1 if opy<900 and opx<11500 then repel=1 if opx<900 and opy>11150 then repel=1 if opx<1300 and opy>4200 and opy<7800 then repel=1 if opx<1300 and opy>4200 and opy<7800 then repel=1 if opx<2000 and opy>900 and opy<3100 then repel=1 if opx<6500 and opy>3250 and opy<3900 then repel=1 if opx>6100 and opx<7900 and opy>2750 and opy<4500 then repel=1 rem left hedge if opx>900 and opx<6750 and opy>8500 and opy<9100 then repel=1 if opx>6200 and opx<7800 and opy>7850 and opy<9550 then repel=1 if opx>5000 and opx<7500 and opy>10313 and opy<12000 then repel=1 rem posts if opx>8330 and opx<8930 and opy>6670 and opy<7240 then repel=1 if opx>8330 and opx<8930 and opy>4300 and opy<4930 then repel=1 rem church if opx>11130 and opx<12000 and opy>700 and opy<4950 then repel=1 if opx>11130 and opx<12000 and opy>7000 and opy<12000 then repel=1 if opx>11000 and opx<12000 and opy>4800 and opy<5850 then repel=1 if opx>11000 and opx<12000 and opy>6100 and opy<7100 then repel=1 rem back bushes if opx>700 and opx<1200 and opy>7500 and opy<12000 then repel=1 if opx>700 and opx<1000 and opy>700 and opy<4500 then repel=1 rem trees if opx>4180 and opx<4780 and opy>3900 and opy<4280 then repel=1 if opx>4250 and opx<4750 and opy>8180 and opy<8600 then repel=1 rem *to be added to bullet hole collision testing* rem left church room if opx>11700 and opx<17650 and opy<5450 then repel=1 rem right room if opx>11700 and opx<16100 and opy>6450 and opy<6950 then repel=1 if opx>16800 and opx<17650 and opy>6450 and opy<6950 then repel=1 if opx>15900 and opx<16400 and opy>6350 and opy<7050 then repel=1 if opx>16500 and opx<17000 and opy>6350 and opy<7050 then repel=1 if opx>15900 and opx<16400 and opy>4650 and opy<5550 then repel=1 if opx>16500 and opx<17000 and opy>4650 and opy<5550 then repel=1 rem therefore door way is 16400-16500 6450-6550 if opx>17150 and opx<17650 and opy>6450 and opy<12000 then repel=1 if opx>17599 and opx<18171 and opy>0 and opy<952 then repel=1 if opy<287 then repel=1 if opx>18292 and opx<18989 and opy>1077 and opy<10947 then repel=1 if opx>17600 and opx<18101 and opy>10990 and opy<11500 then repel=1 if opy>11370 then repel=1 if opx>20495 and opx<21904 and opy>9916 and opy<11200 then repel=1 if opx>23076 and opx<24461 and opy>9916 and opy<11200 then repel=1 if opx>25824 and opx<27060 and opy>9916 and opy<11200 then repel=1 if opx>20495 and opx<21904 and opy>686 and opy<2120 then repel=1 if opx>23076 and opx<24461 and opy>686 and opy<2120 then repel=1 if opx>25824 and opx<27060 and opy>686 and opy<2120 then repel=1 if opx>27659 and opx<28200 and opy>0 and opy<816 then repel=1 if opx>27639 and opx<28200 and opy>10856 and opy<12000 then repel=1 if opx>28100 and opy>9408 then repel=1 if opx>28100 and opy<9208 and opy>3355 then repel=1 if opx>28100 and opy<3155 then repel=1 if opx>29800 then repel=1 rem Demon collision if opx>ex-300 and opx<ex+300 and opy>ey-300 and opy<ey+300 then repel=1 rem alta+height nnoh=0 if opx>25100 and opx<30000 and opy>2950 and opy<9200 then nnoh=200: if opx>25600 and opx<29500 and opy>3500 and opy<8600 then nnoh=400 if opx>25700 and opx<26700 and opy>4850 and opy<7200 then nnoh=1200 rem pews if opx>19300 and opx<24260 and opy>1850 and opy<10200 for f=19300 to 24260 step 540 if opx>f-100 and opx<f+150 and opy>1850 and opy<3850 then nnoh=300 if opx>f-150 and opx<f-50 and opy>1850 and opy<3850 then nnoh=500 next f for f=19300 to 24260 step 540 if opx>f-100 and opx<f+150 and opy>4750 and opy<7000 then nnoh=300 if opx>f-150 and opx<f-50 and opy>4750 and opy<7000 then nnoh=500 next f for f=19300 to 24260 step 540 if opx>f-100 and opx<f+150 and opy>7950 and opy<10200 then nnoh=300 if opx>f-150 and opx<f-50 and opy>7950 and opy<10200 then nnoh=500 next f endif rem virgers room rem table if opx>13844 and opx<14352 and opy>7118 and opy<8137 then nnoh=500 dh=nnoh/2 if opx>16755 and opx<17000 and opy>7000 and opy<9000 then repel=1 if opx>16098 and opx<17000 and opy>8474 and opy<9000 then repel=1 if opx>14363 and opx<15745 and opy>8466 and opy<9000 then repel=1 if opx>13644 and opx<16900 and opy>8621 and opy<9000 then repel=1 if opx>12726 and opx<13726 and opy>6950 and opy<8776 then repel=1 if jump=0 then noh=curvevalue(nnoh,noh,10) skipcol: return activatevideo: inc vidcount if vidcount>50 and vidcount<150 then vsp#=curvevalue(24,vsp#,5) position object 6100,vsp#,17,40 if vidcount>99 and vidcount<110 then texture object 6100,60100+(vidcount-100) if vidcount=110 then show object 6101:play sound 104 texture object 6101,60200+rnd(9) if sound playing(104)=1 and vidcount>499 then vidcount=499 if vidcount>521 then vsp#=curvevalue(40,vsp#,5) if vidcount=500 then hide object 6101 if vidcount=501 then texture object 6100,60109 if vidcount=503 then texture object 6100,60108 if vidcount=505 then texture object 6100,60107 if vidcount=507 then texture object 6100,60106 if vidcount=509 then texture object 6100,60105 if vidcount=511 then texture object 6100,60104 if vidcount=513 then texture object 6100,60103 if vidcount=515 then texture object 6100,60102 if vidcount=517 then texture object 6100,60101 if vidcount=519 then texture object 6100,60100 return checkdemonstate: rem stand rem if state=0 rem inc stcount rem stand=stcount rem if stcount>10 then stand=10-(stcount-10) rem if stand<1 then stcount=0 rem set object frame (445),stand rem endif rem attack if state=2 if object frame(445)=70 then play object 445,70,100 if object frame(445)>76 and object frame(445)<77 then set sound speed 40,11000:play sound 40 if object frame(445)=100 then set object frame 445,70 endif rem hit if blood=1000 play object 445,100,130 if opx>ex then ex=ex-24 if opx<ex then ex=ex+24 if opy>ey then ey=ey-24 if opy<ey then ey=ey+24 endif return rem die deaded: stop sound 104 do inc ded pitch camera up 32/ded if ded=2 then play sound 101:stop sound 102 set gamma 255-ded,0,0 REM RESET ALL VARIABLES if ded>254 dead=0:set gamma 255,255,255 red=0 pain=0 ded=0 count=0 vidcount=0 titlecount=0 ltitc#=0 ltc=0 vsp#=44 path=0 hide object 6101 goto start: endif loop return theend: delete sound 1 for f=1 to 65535:if object exist(f)=1 then delete object f next f delete static objects load sound "sounds/theend.wav",1 play sound 1 hide mouse load bitmap "sys/theend.bmp" sync do if mouseclick()=1 then break loop